<!DOCTYPE html>
<html lang="zh-CN">

<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0">
  <meta http-equiv="Content-Security-Policy"
    content="default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval'; style-src 'self' 'unsafe-inline'; img-src 'self' data:;">
  <title>新干县纪委</title>
  <link rel="stylesheet" href="../src/styles/global.css">
  <link rel="stylesheet" href="../src/styles/workbench.css">
  <link rel="stylesheet" href="../src/styles/components.css">
</head>

<body>
  <div class="workbench-container">
    <!-- 顶部导航栏 -->
    <header class="workbench-header">
      <div class="nav-container">
        <div class="nav-menu">
          <!-- Logo和标题 -->
          <div class="logo-area">
            <span class="logo-icon">📊</span>
            <span class="app-title">工作台</span>
          </div>
          <div class="divider">|</div>

          <!-- 数据管理下拉菜单 -->
          <div class="dropdown">
            <button class="nav-item dropdown-toggle" data-module="data">数据管理 ▾</button>
            <div class="dropdown-menu">
              <div class="dropdown-item" onclick="showImportModal && showImportModal()">📥 导入数据</div>
              <div class="dropdown-item" onclick="showDataViewTab && showDataViewTab()">📊 数据仓库</div>
            </div>
          </div>

          <button class="nav-item" data-module="template">模版管理</button>
          <button class="nav-item" data-module="analysis">智能分析</button>
          <button class="nav-item" data-module="profile">人物画像</button>
          <button class="nav-item" data-module="tools">辅助工具</button>
        </div>
        <div class="nav-actions">
          <span id="caseTitleDisplay" style="margin-right: 20px; font-size: 0.9rem; opacity: 0.8;"></span>
          <button class="btn-primary" id="homeBtn">返回首页</button>
        </div>
      </div>
    </header>

    <!-- 主区域：标签页容器 -->
    <main class="workbench-main">
      <div class="tab-header">
        <div class="tab-list" id="mainTabList">
          <!-- 动态生成的标签将放在这里 -->
        </div>
      </div>
      <div class="tab-content" id="mainTabContent">
        <!-- 默认显示仪表盘 -->
        <div class="tab-pane active" id="dashboardPane">
          <div class="module-placeholder">
            <h3>欢迎使用案件分析工作台</h3>
            <p>请从上方菜单选择功能开始工作</p>
          </div>
        </div>
      </div>
    </main>
  </div>

  <!-- 按正确顺序加载所有模块 -->
  <!-- 首先加载工具模块 -->
  <script src="../src/common/utils.js"></script>

  <!-- 加载UI组件 -->
  <script src="../src/renderer/components/sidebar.js"></script>
  <script src="../src/renderer/components/case-selector.js"></script>

  <!-- 然后加载各个功能模块 -->
  <script src="../src/renderer/workbench/services/subject-service.js"></script>
  <script src="../src/renderer/workbench/services/analysis-result-service.js"></script>

  <!-- 智能分析模块 -->
  <script src="../src/renderer/workbench/analysis-core.js"></script>
  <!-- 资金战法 (6个) -->
  <script src="../src/renderer/workbench/analyzers/financial/fast-pass.js"></script>
  <script src="../src/renderer/workbench/analyzers/financial/smurfing.js"></script>
  <script src="../src/renderer/workbench/analyzers/financial/off-hour-trading.js"></script>
  <script src="../src/renderer/workbench/analyzers/financial/special-amount.js"></script>
  <script src="../src/renderer/workbench/analyzers/financial/loop.js"></script>
  <script src="../src/renderer/workbench/analyzers/financial/dormant.js"></script>
  <!-- 通讯战法 (4个) -->
  <script src="../src/renderer/workbench/analyzers/communication/intimacy-analysis.js"></script>
  <script src="../src/renderer/workbench/analyzers/communication/additional-analyzers.js"></script>
  <!-- 轨迹战法 (4个) -->
  <script src="../src/renderer/workbench/analyzers/geospatial/all-analyzers.js"></script>
  <!-- 综合关联 (4个) -->
  <script src="../src/renderer/workbench/analyzers/correlation/all-analyzers.js"></script>
  <script src="../src/renderer/workbench/profile.js"></script>
  <script src="../src/renderer/workbench/analysis.js"></script>
  <script src="../src/renderer/workbench/tools.js"></script>
  <script src="../src/renderer/workbench/template.js"></script>
  <script src="../src/renderer/workbench/data-view.js"></script>
  <script src="../src/renderer/workbench/data.js"></script>

  <!-- 最后加载主入口文件 -->
  <script src="../src/renderer/workbench/index.js"></script>

</body>

</html>